﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH6_2009A.LowCode.IRespository
{
    public interface IBaseRespository<T> where T : class,new()
    {
        //int Insert(string sql, object param, IDbTransaction transaction = null);
        //int Update(string sql, object param, IDbTransaction transaction = null);
        //int Delete(string sql, object param, IDbTransaction transaction = null);

        //dapper的查询操作（返回结果集）
        IEnumerable<T> Query(string sql,object param=null);
        IEnumerable<T> Query(string sql, object param, CommandType commandType);

        //dapper的增删改操作(返回受影响行数)
        int Execute(string sql, object param, IDbTransaction transaction = null);
    }
}
